package cn.buk.tms.dto;

/**
 * Created by gezhi on 15/11/2.
 */
public class EnterpriseConfigDto {

    private String tbookingUsername;
    private String tbookingPassword;
    private String tbookingMd5Password;
    /**
     * 0-不启用,1-启用
     */
    private int tbookingStatus;

    /**
     * tbooking订单能接受的最大亏损
     */
    private float tbookingMaxLoss;

    /**
     * BSP出票的打票机号(用于自动出票）
     */
    private int bspPrinterNo;

    /**
     * 0-不启用自动上传政策到携程
     * 1-启用
     */
    private int autoUploadCtripPolicy;

    /**
     * 0-不自动调整政策, 1-自动调整政策
     */
    private int autoAdjustPolicy;

    /**
     * 价格调整的幅度，单位：分，取值范围：1 - 1000
     */
    private Integer priceAdjustment;

    private String crazyAirlines;

    /**
     * 默认底价,为百分比,1-100
     */
    private Integer bottomPrice;

    /**
     * 每晚一次的自动加价幅度，单位元
     */
    private Integer increasePriceInNight;

    /**
     * 格式：hhmm
     */
    private String workBeginTime;

    private String workEndTime;

    /**
     * 周工作日: 1234567
     */
    private String workDay;

    private String receivingAccount;

    private String officeNo;
    private int monitorDomPolicyCount;   //开通的国内监控数量
    private int monitorIntlPolicyCount;  //开通的国际监控数量

    private boolean oneStepCreateOrder;


    public Integer getPriceAdjustment() {
        if (priceAdjustment == null) {
          return 5;
        }
        return priceAdjustment;
    }

    public void setPriceAdjustment(int priceAdjustment) {
        if (priceAdjustment > 0 && priceAdjustment <= 1000) {
          this.priceAdjustment = priceAdjustment;
        } else {
          this.priceAdjustment = 5;
        }
    }

    public String getWorkBeginTime() {
        if (workBeginTime == null || workBeginTime.length() != 4) {
          workBeginTime = "0830";
        }
        return workBeginTime;
    }

    public void setWorkBeginTime(String workBeginTime) {
        this.workBeginTime = workBeginTime;
    }

    public String getWorkEndTime() {
        if (workEndTime == null || workEndTime.length() != 4) {
          workEndTime = "2000";
        }
        return workEndTime;
    }

    public void setWorkEndTime(String workEndTime) {
        this.workEndTime = workEndTime;
    }

    public Integer getIncreasePriceInNight() {
        if (increasePriceInNight == null) {
          return 1000;
        }
        return increasePriceInNight;
    }

    public void setIncreasePriceInNight(Integer increasePriceInNight) {
        this.increasePriceInNight = increasePriceInNight;
    }

    public String getTbookingUsername() {
        return tbookingUsername;
    }

    public void setTbookingUsername(String tbookingUsername) {
        this.tbookingUsername = tbookingUsername;
    }

    public String getTbookingPassword() {
        return tbookingPassword;
    }

    public void setTbookingPassword(String tbookingPassword) {
        this.tbookingPassword = tbookingPassword;
    }

    public int getTbookingStatus() {
        return tbookingStatus;
    }

    public void setTbookingStatus(int tbookingStatus) {
        this.tbookingStatus = tbookingStatus;
    }

    public String getTbookingMd5Password() {
        return tbookingMd5Password;
    }

    public void setTbookingMd5Password(String tbookingMd5Password) {
        this.tbookingMd5Password = tbookingMd5Password;
    }

    public int getAutoAdjustPolicy() {
        return autoAdjustPolicy;
    }

    public void setAutoAdjustPolicy(int autoAdjustPolicy) {
        this.autoAdjustPolicy = autoAdjustPolicy;
    }

    public Integer getBottomPrice() {
        if (bottomPrice == null || bottomPrice < 1 || bottomPrice > 100) {
          bottomPrice = 100;
        }
        return bottomPrice;
    }

    public void setBottomPrice(Integer bottomPrice) {
        this.bottomPrice = bottomPrice;
    }

    public String getCrazyAirlines() {
        if (crazyAirlines == null) {
          return "";
        } else {
          return crazyAirlines.toUpperCase().trim();
        }
    }

    public void setCrazyAirlines(String crazyAirlines) {
        this.crazyAirlines = crazyAirlines;
    }

    public String getOfficeNo() {
        if (officeNo == null) {
          return "";
        } else {
          return officeNo.toUpperCase().trim();
        }
    }

    public void setOfficeNo(String officeNo) {
        this.officeNo = officeNo;
    }

    public int getAutoUploadCtripPolicy() {
        return autoUploadCtripPolicy;
    }

    public void setAutoUploadCtripPolicy(int autoUploadCtripPolicy) {
        this.autoUploadCtripPolicy = autoUploadCtripPolicy;
    }

    public int getMonitorDomPolicyCount() {
        return monitorDomPolicyCount;
    }

    public void setMonitorDomPolicyCount(int newValue) {
        this.monitorDomPolicyCount = newValue;
    }

    public int getMonitorIntlPolicyCount() {
        return monitorIntlPolicyCount;
    }

    public void setMonitorIntlPolicyCount(int newValue) {
        this.monitorIntlPolicyCount = newValue;
    }

    public void setWorkDay(String workDay) {
        this.workDay = workDay;
    }

    public String getWorkDay() {
        return workDay;
    }

    public String getReceivingAccount() {
        return receivingAccount;
    }

    public void setReceivingAccount(String receivingAccount) {
        this.receivingAccount = receivingAccount;
    }

    public boolean isOneStepCreateOrder() {
        return oneStepCreateOrder;
    }

    public void setOneStepCreateOrder(boolean oneStepCreateOrder) {
        this.oneStepCreateOrder = oneStepCreateOrder;
    }

    public float getTbookingMaxLoss() {
        return tbookingMaxLoss;
    }

    public void setTbookingMaxLoss(float tbookingMaxLoss) {
        this.tbookingMaxLoss = tbookingMaxLoss;
    }

    public int getBspPrinterNo() {
        return bspPrinterNo;
    }

    public void setBspPrinterNo(int bspPrinterNo) {
        this.bspPrinterNo = bspPrinterNo;
    }
}
